package day09;

import javax.print.attribute.HashPrintServiceAttributeSet;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;

public abstract interface PCI {
    void start();

    void stop();
}
class Soundcard implements PCI {
    public void start() {
        System.out.println("声卡工作中");
    }
    public void hah(){
        System.out.println("哈哈");
    }

    public void stop() {
        System.out.println("声卡结束工作");
    }
}

class Graphicscard implements PCI {
    private int age;

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public void start() {
        System.out.println("显卡工作中");
    }

    public void stop() {
        System.out.println("显卡结束工作");
    }
}

class Networkcard implements PCI {
    public void start() {
        System.out.println("网卡工作中");
    }

    public void stop() {
        System.out.println("网卡结束工作");
    }
}

class Main2 {
    public static void main(String[] args) {

        PCI p1 = new Graphicscard();

        p1.start();
        p1.stop();
        PCI p2 = new Networkcard();
        p2.start();
        p2.stop();

        PCI p3 = new Soundcard();
        Soundcard p4=new Soundcard();
        p4.hah();
        p3.start();
        p3.stop();
    }
}
